pp108 : getListOfFiles (FTP)

getListOfFiles (FTP)


This Web service operation is used to list files and folders in a specified directory on the FTP server.

SOAP Request
<SOAP:Envelope xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
    <SOAP:Body>
        <getListOfFiles xmlns="http://schemas.cordys.com/ftpconnector/1.1">
            <configuration>wftp</configuration>
            <directory details="true">/</directory>
        </getListOfFiles>
    </SOAP:Body>
</SOAP:Envelope>

Request Parameters

Tags Description
configuration Name of the Configuration that contains the FTP server details.
directory

The directory path from which the files are listed. You can set the following values to this parameter.

  • true - file details such as size and timestamp of last modification are displayed.
  • false - file details are not displayed.


SOAP Response
<getListOfFilesResponse
    xmlns="http://schemas.cordys.com/ftpconnector/1.1" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
    <configuration>wftp</configuration>
    <directory>/</directory>
    <file>aa.txt
    <size>33</size>
        <lastmodified>2009-05-18T12:01:00</lastmodified>
    </file>
    <file>dir1
    <lastmodified>2010-01-25T14:21:00</lastmodified>
    </file>
    <statuscode>226</statuscode>
    <status>Transfer complete.</status>
</getListOfFilesResponse>


Table 1. Response Parameters

Tags Description
<name> Name of the file.
size Size of the file in bytes.
lastmodified Timestamp when the file was last modified on the server.